#ifndef SCANNER_H
#define	SCANNER_H

 #ifdef __cplusplus
 extern "C" {
 #endif 

#include <stdint.h>
#include "../BMC.h"

enum ScanDataEnum{
    SDE_HARDSPOT = 0x01,
    SDE_SOFTSPOT = 0x02
};
     
//This function initializes the scanner
void            SCN_Init();

//This function is responsible for scanning memory and building a list of
//BMC's that should be translated next
BMCList*        SCN_Scan(uint16_t StartingAddress);

//This function is reponsible for post-processing a block.
//It does the following:

//1-> Determines whether branch instructions change control flow to another
//instruction inside the current block. If so, this enables jump table usage
//during block execution

//2-> Determines whether the block is pure: does it have any branch instructions
//at all, except for the last instruction (which may be a branch or jump)?
//If so, this may help towards cycle accuracy

//3-> If the block is pure, it also determines how many target machine cycles
//the execution of the block would take. This is not possible to determine in
//non-pure blocks.

void            SCN_BMCAnalysis(BMC* Block);

#ifdef __cplusplus
 }
#endif

#endif	/* SCANNER_H */

